<!DOCTYPE html>
<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ include file="/WEB-INF/views/taglibs.jsp" %>
<html>
<head> <meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form id="form1" action="insert">
<div class="dialogPage">
	<div class="om-panel-header">新增</div>
	<div class="editDiv">
		<input type="hidden" id="pid" name="pid" value="${parent.id}" >
		<table class="editTable">
		<tr>
			<td>父类型：</td> <td>${parent.name}</td>
		</tr>
		<tr>
			<td><span class="required">*</span>类型名字：</td><td><input type="text" id="name" name="name"class="easyui-validatebox" required="required" validType="isExist['checkType','name','中文名已经存在,请重新输入']" ></td>
		</tr>
		<tr>
			<td><span class="required">*</span>英文名字：</td><td><input type="text" id="englishName" name="englishName"class="easyui-validatebox" required="required" validType="isExist['checkType','name','英文名已经存在,请重新输入']"> </td>
		</tr>
		<tr>
			<td>类型描述：</td><td><input type="text" id="typeDesc" name="typeDesc"></td>
			
		</tr>
		<tr>
			<td>类型状态：</td><td><input id="status" name="status" type="combo"></td>
		</tr>
	   </table>
	   <div class="editBtn">
			<button id ="btnSubmit" type="button" class="button">&nbsp;保存&nbsp;</button>
			<button type="button" class="button" onclick="javascript:art.dialog.close();">&nbsp;关闭&nbsp;</button>
		</div>
	</div>
</div>
</form>
</body>
<script type="text/javascript">

$(function(){
	$('#name').validatebox({
		required:true,
		validType:['maxLength[32]']  
	}); 
	$('#typeDesc').validatebox({
		validType:['maxLength[200]']
	});
	$('#status').combobox({  
    	data:JSON.parse('${statusCombo}'),
    	panelHeight:'auto',
    	editable:false,
    	value:'1'
    });
	$('#btnSubmit').click(function(){
		if($('#form1').form('validate')){			
			$('#form1').submit();
			return true;
		}
	})
});

</script>
</html>